home *** CD-ROM | disk | FTP | other *** search
Wrap
/* Image Engineer ARexx macro script */ /* by Simon Edwards */ /* 27/4/95 */ /* */ /* Contrast Stretches the region marked out on a given project */ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit 'PROJECT_INFO' arg(1) 'BOX' /* Get the dimensions of the box */ CropBox=RESULT 'CROP' arg(1) CropBox /* Crop it */ CropPic=RESULT 'CONTRAST_STRETCH' CropPic NewPic=RESULT CLOSE CropPic 'MARK' NewPic 'PRIMARY' /* Mark the pixelized image as primary */ 'MARK' arg(1) 'SECONDARY' /* Mark the original as secondary */ 'COMPOSITE' WORD(CropBox,1) WORD(CropBox,2) MIX 100 /* Merge the two */ CLOSE NewPic exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end